Skip to content

Conversation

@meet-159
Copy link
Contributor

Creating a pre-build process to install and fetch data for the components that are transformed into npm packages.
the prebuild process goes through the main.agml and finds any i (install) function call and accordingly installs the package, then writes the fetchDataFunction into the lib/util/main.ts file so that during bun run dev command the data can be fetched for all the packages including the new ones.

To fetch data for the package the npm package must export a function called - "fetchDataFunction".

further to install and use package in project follow below syntax:

use i <package name> to install the package in project
use use <component name> from <package name> to import it.
use get Data to retrieve data (if any) used for the component.

example:
i @meet-159/discor-stats-counter
use Discordstatscounter from @meet-159/discor-stats-counter
get discordCounters
<Discordstatscounter {discordCounters} />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant